package org.example.bean;

import javafx.util.Pair;

import java.util.List;

public class ParseTable{
    public String left;
    Pair<String,String> Left;
    //或者定义一个三元式<String,String,List<String>>,三个都是有序的

    public String getLeft() {
        return left;
    }

    public void setLeft(String left) {
        this.left = left;
    }

    public String getVt() {
        return vt;
    }

    public void setVt(String vt) {
        this.vt = vt;
    }

    public List<String> getRight() {
        return right;
    }

    public void setRight(List<String> right) {
        this.right = right;
    }

    public String vt;
    public List<String> right;
    //Map<<string,string>,List<String>>;怎么定义这个数据结构，前面两个string是有序的

    @Override
    public String toString(){
        StringBuilder res=new StringBuilder();
        res.append(left).append("->").append(vt).append("->");
        for (String s : right) {
            res.append(s);
        };
        return res.toString();
    }
    public String ptRight(){
        StringBuilder res=new StringBuilder();
        for (String s : right) {
            res.append(s);
        };
        return res.toString();
    }
}